<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>用户注册</title>
    <link rel="stylesheet" type="text/css" href="./css/login.css">
    <link rel="stylesheet" type="text/css" href="./css/table.css">
</head>
<style>
    body{
        background: url('./img/loginbg.jpg') top left;
        background-size: 100%;
    }
</style>
<body>
<div id="loginDiv">
    <div>
        <div class="register">
            <c:if test="${!empty msg}">
                <div class="alert alert-danger">${msg}</div>
            </c:if>
            <form action="registerServlet" method="post" id="form">
                <div class="register-top-grid">
                    <h3>注册新用户</h3>
                    <div id="errorMsg">${register_msg}</div>
                    <div class="input">
                        <span>用户名</span>
                        <input type="text" name="username" placeholder="请输入用户名" required="required">
                    </div>
                    <div class="input">
                        <span>密码</span>
                        <input type="text" name="password" placeholder="请输入密码" required="required">
                    </div>
                    <div class="input">
                        <span>姓名</span>
                        <input type="text" name="name" placeholder="请输入姓名" required="required">
                    </div>
                    <div class="input">
                        <span>电话</span>
                        <input type="text" name="phone" placeholder="请输入电话" required="required">
                    </div>
                    <div class="input">
                        <span>邮箱</span>
                        <input type="text" name="email" placeholder="请输入邮箱" required="required">
                    </div>
                    <label><input type="radio" name="role" value="1" checked>学生</label>
                    <label><input type="radio" name="role" value="2">教师</label>
                    <div class="clearfix"></div>
                </div>
                <div class="register-but text-center">
                    <input type="submit" value="注册">
                    <div class="clearfix"></div>
                </div>
            </form>
        </div>
    </div>
</div>
</body>
</html>
